*{
    margin: 0;
    padding: 0;
}
header {
    position: relative; /* 新增，方便遮罩定位 */
    height: 340px;
    padding-top: 80px;
    background: url(images/购物1.png) no-repeat center center;
    background-size: cover;
    background-position-y: -350px;
}
.header-mask {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.5); 
    pointer-events: none; /* 避免遮罩影响交互 */
    z-index: 1;
}
header .container {
    position: relative;
    z-index: 2;
}
search{
    display: flex;
    align-items: flex-start;
}
input{
    height: 36px;
    width: 765px;
    border: 2px solid #109601;
    padding-left: 10px;
    border-radius: 10px;
    font-size: 16px;
    opacity: 0.8;
}
input:focus{
    outline: none;
}
header button{
    height: 32px;
    width: 63px;
    border: 2px solid #109601;
    border-radius: 8px;
    font-size: 14px;
    background-color: #109601;
    color: white;
    position: relative;
    right: 100px;
    top: 0.5px;
    cursor: pointer;
}
.camera{
    width: 25px;
    height: 25px;
    position: relative;
    right: 105px;
    top: 6px;
    cursor: pointer;
}
.bianjie{
    width: 900px;
    position: relative;
    bottom: 80px;
    left: 340px;
    display: flex;
    justify-content: center;
    align-content: center;
    flex-wrap: wrap;
}
.bianjie a{
    text-decoration: none;
    text-align: center;
    color: white;
    background-color: #0b7100; 
    transition: background-color 0.2s, color 0.2s; 
    font-size: 16px;
    font-weight: bolder;
    width: 85px;
    height: 28px;
    line-height: 28px;
    border: 1.5px solid #0b7100;
    border-radius: 5px;
    margin-right: 50px;
    margin-bottom: 20px;
}
.bianjie a:hover{
    color: #0b7100;
    background-color: white;
    opacity: 0.8;
}
.hot{
    position: relative;
    bottom: 80px;
}
.hot .container{
    height: 200px;
    display: flex;
    align-content: center;
}
.hot-1, .hot-2, .hot-4, .hot-5{
    width: 203px;
    height: 150px;
    margin-right: 10px;
    background-color: rgba(244, 244, 244, 0.824);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out;
}
.hot-3{
    width: 390px;
    height: 150px;
    margin-right: 10px;
    background-color: rgba(244, 244, 244, 0.824);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out;
}
.hot-1 img, .hot-2 img, .hot-3 img, .hot-4 img, .hot-5 img{
    width: 100%;
    height: 100%;
    border-radius: 8px;
}
.hot-1 a, .hot-2 a, .hot-3 a, .hot-4 a, .hot-5 a{
    text-decoration: none;
    position: relative;
    bottom: 40px;
    left: 15px;
    font-size: 22px;
    font-weight: bold;
    color: red;
}
.hot-3 a, .hot-4 a, .hot-5 a{
    color: white;
}
.hot-1:hover, .hot-2:hover, .hot-3:hover, .hot-4:hover, .hot-5:hover{
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}
.logo{
    position: relative;
    right: 20px;
    margin-right: 30px;
}
.logo img{
    width: 150px;
    height: 150px;
    margin-right: 20px;
}
.container{
    width: 1250px;
    margin: 0 auto;
}
nav .container{
    display: flex;
    justify-content: center;
    align-content: center;
    flex: 1;
}
.left-list img, .user img{
    width: 18px;
    height: 18px;
    position: relative;
    top: 4px;
}
.left-list, .user{
    width: 300px;
    height: 330px;
    background-color: rgb(244, 244, 244);
    border-radius: 8px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
}
.left-list a{
    text-decoration: none;
    color: black;
    padding:5px;
}
.list a:hover{
    color: #109601;
    font-weight: bold;
}
.list{
    height: 30px;
    margin-top: 6px;
    margin-left: 10px;
    transition: background-color 0.2s,color 0.1s;
    z-index: 100;
}
.list:hover{
    background-color: white;
    border-radius: 5px;
    width: 280px;
}
.right-content {
    display: none;
    position: absolute;
    padding: 15px;
    border: 2px solid #109601;
    border-radius: 8px;
    background-color: white;
    z-index: 999;
    min-width: 500px;
}
.right-content a{
    display: inline-block;
    color: #000000;
    padding-left:10px;
    margin-right: 10px;
    text-decoration: none;
    transition: color 0.2s;
}
.right-content a:hover{
    color: #109601;
    font-weight: bold;
    text-decoration: underline;
}
.user{
    width: 350px;
    height: 330px;
    background-color: rgb(244, 244, 244);
    border-radius: 8px;
    margin-top: 10px;
}
.user a{
    text-decoration: none;
    color: black;
    padding: 10px;
}
.user-pic, .login{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.user-p1{
    border: 2px solid #109601;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    position: relative;
    top: 10px;
}
.user-pic img{
    width: 50px;
    height: 50px;
    position: relative;
    top: 5px;
    left: 5px;
}
.user-pic span{
    position: relative;
    top: 8px;
    font-size: 18px;
    font-weight: bolder;
    margin-top: 10px;
    letter-spacing: 4px;  /*字间距*/
}
.login{
    position: relative;
    top: 25px;
}
.login button{
    width: 300px;
    height: 40px;
    background-color: #109601;
    transition: background-color 0.4s, color 0.4s;
    color: white;
    font-size: 16px;
    font-weight: bolder;
    letter-spacing: 10px; 
    border: none;
    border-radius: 5px;
}
.login button:hover{
    background-color: white;
    color: #109601;
    font-weight: bolder;
    border: 1.5px solid #109601;
    cursor: pointer;
}
.login a{
    font-size: 14px;
    color:#109601;
    margin-top: 10px;
    cursor: pointer;
}
.login a:hover{
    color: #0b7100;
    font-weight: bolder;
}
.entrance{
    display: flex;
    justify-content: center;
    align-content: center;
    position: relative;
    top: 25px;
}
.shopping-car, .shoucang, .kefu, .dingdan{
    margin: 10px auto;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.1s;/*同时变色*/
}
.shopping-car:hover, .shoucang:hover, .kefu:hover, .dingdan:hover{
    background-color: #109601;
    border-radius: 8px;
}
.shopping-car:hover a, .shoucang:hover a, .kefu:hover a, .dingdan:hover a 
{
    color: white;
    font-weight: bolder;
}
.shopping-car:hover img, .shoucang:hover img, .kefu:hover img, .dingdan:hover img 
{
    filter: brightness(0) invert(100%);     
}
.shopping-car img, .shoucang img, .kefu img, .dingdan img
{
    width: 20px;
    height: 20px;
}
.shopping-car img{
    position: relative;
    left: 20px;
}
.kefu img, .dingdan img{
    position: relative;
    left: 22px;
}
.shoucang img{
    position: relative;
    left: 30px;
}
.middle-recommand{
    width: 575px;
    height: 330px;
    background-color: rgb(244, 244, 244);
    border-radius: 8px;
    margin: 10px;
    display: flex;
    justify-content: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
}
.tuijian-1, .tuijian-2,.tuijian-3,.tuijian-4{
    height: 152px;
    background-color: white;
    border-radius: 10px;
    margin-left: 8px;
    margin-top: 8px;    
    transition: transform 0.2s ease-in-out;
    z-index: 10;
    display: flex;
}
.tuijian-1, .tuijian-2,.tuijian-4{ 
    justify-content: center;
    align-content: center;
    flex-direction: column;
}
.tuijian-3{
    justify-content: flex-start;
    align-content: flex-start;
}
.tuijian-1,.tuijian-4{
    width: 200px;      
}
.tuijian-2,.tuijian-3{
    width: 350px;
}
.tuijian-1:hover, .tuijian-2:hover, .tuijian-3:hover, .tuijian-4:hover{
    transform: scale(1.05);
    transition: transform 0.2s ease-in-out;
}
.tuijian-1 img{
    transform: scale(0.45);
    position: relative;
    bottom: 10px;
}
.tuijian-2 img{
    height: 100%;
    width: 100%;
    position: relative;
    top: 10px;
    border-radius: 10px
}
.tuijian-3 img{
    transform: scale(0.5);
}
.CX-1{
    position: relative;
    right: 10px;
}
.CX-2{
    position: relative;
    right: 70px;
}
.tuijian-4 img{
    transform: scale(0.6);
}
.tuijian-1 a, .tuijian-4 a{
    text-decoration: none;
    text-align: center;
    color: black;
    font-weight: bold;
    letter-spacing: 5px;
    position: relative;
    top: -50px;
    font-size: 18px;
}
.tuijian-2 a{
    text-decoration: none;
    text-align: center;
    color: gold;
    font-weight: bolder;
    text-shadow: 3px 3px 3px #000,3px 3px 3px #000;  /* 右下阴影,双重叠加 */
    letter-spacing: 15px;
    font-size: 18px;
    position: relative;
    top: -30px;
}
.tuijian-3 a{
    display: inline-block;
    text-decoration: none;
    text-align: center;
    color: rgba(128, 128, 128, 0.413);
    font-size: 10px;
    text-align: center;
    position: relative;
    top: 120px;
    right: 120px;
}
.nav .jingxvan img{
    width: 12px;
    height: 12px;
    display: inline-block;
}
.nav button{
    height: 30px;
    width: 70px;
    font-size: 14px;
    color: #109601;
    margin-right: 6px;
    position: relative;
    left: 2px;
    border: none;
    background-color: white;
    border:1.5px solid #109601;
    border-radius: 5px;
    transition: background-color 0.2s, color 0.1s;
    z-index: 30;
}
.nav button:hover,
.nav button.active {
    background-color: #109601;
    color: white;
    font-weight: bold;
    cursor: pointer;
}
.sider{
    width: 65px;
    height: 330px;
    background-color: rgb(248, 248, 248);
    border-radius: 8px;
    z-index: 20;
    right: 0;
    position: fixed;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}
.sider, .my, .xiaoxi, .history, .fankui
{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.my-pic, .xiaoxi-pic, .history-pic{
    width: 25px;
    height: 25px;
}
 .fankui-pic{
    width: 42px;
    height: 42px;
}
.sider a{
    font-size: 14px;
    color: black;
    text-decoration: none;
}
.my, .xiaoxi, .history, .fankui{
    margin-top: 5px;
    margin-bottom: 5px;
    width: 65px;
    height: 65px;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.2s;
}
.my:hover, .xiaoxi:hover, .history:hover, .fankui:hover{
    background-color: #109601;
    border-radius: 8px;
    color: white;  
}
.my:hover img, .xiaoxi:hover img, .history:hover img, .fankui:hover img{
    filter: brightness(0) invert(100%);
}
.my:hover a, .xiaoxi:hover a, .history:hover a, .fankui:hover a{
    color: white;
}
.footer{
    height: 50px;
    background-color: rgb(244, 244, 244);
    margin-top: 8px;
    margin-bottom: 28px;;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.footer a{
    text-decoration: none;
    color: gray;
    font-size: 14px;
    margin-left: 10px;   
}
.footer a:hover{
    color: #109601;
}
#backToTop{
    position: fixed;
    right: 30px;
    bottom: 50px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #109601;
    color: #fff;
    border: none;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: none;
    z-index: 9999;
    transition: transform 0.3s ease-in-out;
}
#backToTop img {
    width: 30px;
    height: 30px;
}
#backToTop:hover {
    transform: scale(1.2);
}
/* 搜索框样式调整 */
#searchInput {
    transition: all 0.3s ease;
}

#searchInput:focus {
    border-color: #0b7100;
    box-shadow: 0 0 5px rgba(16, 150, 1, 0.5);
}

#searchBtn {
    transition: all 0.3s ease;
}

#searchBtn:hover {
    background-color: #0b7100;
}
.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}